package com.allwees.bs.module.ums.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.allwees.bs.core.model.user.entity.UserModel;
import com.allwees.core.common.constant.EStatus;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Transient;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName("usr_user")
public class Customer extends UserModel {

    private static final long serialVersionUID = -6791406290020146817L;
    /**
     * 邀他/她的人
     */
    @Transient
    @TableField(exist = false)
    private String inviterEmail;

    /**
     * 最后一次访问时间
     */
    @Transient
    @TableField(exist = false)
    private Date lastVisitTime;

    public boolean getCanDisable(){
        return EStatus.NORMAL.value().equals(getStatus());
    }
}
